package Practice03_exam;

public class TestRectangle {
    public static void main(String[] args) {
        Rectangle rectangle01 = new Rectangle(10,20,20,10);
        System.out.println("一号矩形周长为："+rectangle01.calculateC());
        System.out.println("一号矩形面积为："+rectangle01.calculateS());

        Point pointC = new Point(10,20);
        Point pointB = new Point(20,10);
//        Rectangle rectangle03 = new Rectangle(pointC,pointB);
//        System.out.println("三号矩形周长为："+rectangle03.calculateC());
//        System.out.println("三号矩形面积为："+rectangle03.calculateS());
        Rectangle2 rectangle02 = new Rectangle2(pointC,pointB);
        System.out.println("二号矩形周长积为："+rectangle02.calculateC());
        System.out.println("二号矩形面积为："+rectangle02.calculateS());

    }
}
